#include <bits/stdc++.h>

using namespace std;

#define int long long

signed main()
{
    double a;
    char b;
    cin >> a >> b;
    int ret = 0;
    if(a <= 1) ret += 20;
    else
    {
        ret += 20;
        a -= 1;
        ret += ceil(a);
    }
    if(b == 'y') ret += 5;
    cout << ret << endl;
    return 0;
}